# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=issniff
pkgver=299.98cb3d0
pkgrel=1
pkgdesc='Internet Session Sniffer.'
groups=('blackarch' 'blackarch-sniffer')
arch=('x86_64' 'aarch64')
url='https://github.com/juphoff/issniff'
license=('custom:unknown')
depends=('libpcap')
makedepends=('git')
source=("git+https://github.com/juphoff/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build() {
  cd $pkgname

  ./configure --prefix=/usr

  make
}

package() {
  cd $pkgname

  install -Dm 755 $pkgname "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 "$pkgname.8" "$pkgdir/usr/share/man/man8/issniff.8"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README README2 INSTALL \
    TODO
}

